-- ArenaBoard
-- Created by chengb Dec/16/2015
-- 角斗台木牌格子

-- 初始化
function initArenaBoard(self)
    self.item:removeAllChildren();

    local function onClicked(sender, eventType)
        if eventType == ccui.TouchEventType.began then
            -- 获取与玩家角斗的冈布奥怪
            local classId = ArenaM.getCombatSlimeId();
            local name = MonsterM.query(classId, "name");

            local petId = ArenaM.querySlime(classId, "pet_id");
            local desc = PetM.query(petId, "desc");

            self:openBuildingView(nil, -25, desc, getLocStr("btn_text_known"), name, getLevelItemIconPath("bulletin"));
            AudioM.playFx("button_spell");
        end
    end

    local iconPath = getLevelItemIconPath("bulletin");
    self.icon = ccui.ImageView:create(iconPath);
    self.icon:setTouchEnabled(true);
    self.icon:addTouchEventListener(onClicked);
    self.item:addChild(self.icon);
end
